<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TextSuggest - TEST</title>

<script language="javascript">
function trace(s)
{
	$('debug').innerHTML += s + "<br />";
}
</script>

<script language="javascript" src="../source/js/prototype/prototype.js"></script>
<script language="javascript" src="../source/js/TextSuggestDataSource.js"></script>
<script language="javascript" src="../source/js/TextSuggest.js"></script>
<link href="../source/css/textsuggest.css" rel="stylesheet" type="text/css" />

<style type="text/css">
body {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	padding: 10px;
}

FORM {
	margin: 10px;
}

INPUT {
	border: 1px solid #999999;
	background: #FAFAFA;
	padding: 0.25em;
}

LABEL {
	font-weight: bold;
	margin-right: 10px;
}

INPUT:focus, INPUT:hover {
	background: #FFFFFF;
}

#debug {
	width: 100%;
	height: 500px;
	overflow: scroll;
	background: #E6E6E6;
	border: 1px solid #666666;
	color: #999999;
	padding: 10px;
}
</style>


</head>

<body>
body text
<form name="foo">
  <label for="searchq">Search</label><input type="text" name="searchq" id="searchq" value="" size="50" />
</form>

<script language="javascript">
<!--
	var sGatewayURL = "sample_datasource.php";
	var dataSource  = new TextSuggestDataSource(sGatewayURL);
	
	//var dataSource = Array("kitchen","bathtub","lawnmower","airplane","zebra","mom","banana","eggplant","stream","pile","wood","dolphin");
	var mTextSuggest = new TextSuggest('searchq', dataSource);
	
	function highlight(n)
	{
		mTextSuggest.highlightSuggestion(n);
	}
-->
</script>

</body>
</html>
